package com.fit.americanChoppers.pages;

import java.util.LinkedList;


import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.ioc.annotations.*;

import com.fit.americanChoppers.beans.SellerBean;
import com.fit.americanChoppers.interfaces.Purchase;
import com.fit.americanChoppers.interfaces.Seller;
import com.fit.americanChoppers.service.Sellers;

public class EntrySeller {
	@Property
	@Persist
	private Seller seller;
	@Inject
	private Sellers sellers;
	
	@SetupRender
	public void createObject() {
		seller = new SellerBean();
		seller.setPurchases(new LinkedList<Purchase>());
	

	}
	
	public void onSuccess() {
		sellers.save(seller);
	}

	
	
}
